<section id="info">

    {% if results.detections %}
    <section id="malfamily">
        <p style="text-align:center; font-size: 18px;font-weight-bold";>Detection(s):
            {% for block  in results.detections %}
                <span class="badge badge-danger">{{block.family}}</span>
            {% endfor %}
            </p>
    </section>
    {% endif %}

    {% if summary_report %}
    <div class="section-title">
        <h4>Sandbox Info</h4>
    </div>
    {% endif %}
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th>Category</th>
                <th>Started On</th>
                <th>Completed On</th>
                <th>Duration</th>
                <th>Cuckoo Version</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>{{results.info.category|upper}}</td>
                <td>{{results.info.started}}</td>
                <td>{{results.info.ended}}</td>
                <td>{{results.info.duration}} seconds</td>
                <td>{{results.info.version}}</td>
            </tr>
        </tbody>
    </table>
</section>

{% if results.info.machine and results.info.machine.name %}
<section id="machine">
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th>Machine</th>
                <th>Label</th>
                <th>Manager</th>
                <th>Started On</th>
                <th>Shutdown On</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>{{results.info.machine.name}}</td>
                <td>{{results.info.machine.label}}</td>
                <td>{{results.info.machine.manager}}</td>
                <td>{{results.info.machine.started_on}}</td>
                <td>{{results.info.machine.shutdown_on}}</td>
            </tr>
        </tbody>
    </table>
</section>
{% endif %}

{% if results.CAPE.configs %}
<h4>Malware config(s)</h4>
<section id="malware_conf">
    {% for config_block in results.CAPE.configs %}
        {% for family, config in config_block.items() %}
            {% if family not in "_associated_config_hashes,_associated_analysis_hashes" %}
                <table class="table table-striped table-bordered" style="table-layout: fixed;">
                    <tr>
                        <th style="border-top: 0; width: 15%;">Type</th>
                        <td style="border-top: 0; word-wrap: break-word;"><b>{{family}} Config</b></td>
                    </tr>
                    {% for key, value in config.items() %}
                    <tr>
                        <th style="border-top: 0; width: 15%;"><b>{{key}}</b></th>
                        <td style="border-top: 0; word-wrap: break-word;">{{value|malware_config}}</td>
                    </tr>
                    {% endfor %}
                </table>
            {% endif %}
        {% endfor %}
    {% endfor %}
</section>
{% endif %}
